package main;

import javax.swing.ImageIcon;
import javax.swing.JFrame;
import javax.swing.JLabel;
import javax.swing.UIManager;
import javax.swing.UIManager.LookAndFeelInfo;
import javax.swing.UnsupportedLookAndFeelException;

public class MainWindows extends JFrame
{

    private static MainWindows windows = new MainWindows();
    public static JLabel contentBackground;

    public static void main(String[] args)
    {
        //Tạo giao diện Windows Form
        try
        {
            for (LookAndFeelInfo info : UIManager.getInstalledLookAndFeels())
            {
                if ("Windows".equals(info.getName()))
                {
                    UIManager.setLookAndFeel(info.getClassName());
                    break;
                }
            }
        }
        catch (ClassNotFoundException | InstantiationException | IllegalAccessException | UnsupportedLookAndFeelException e)
        {
        }

        windows.setLayout(null);//set Layout
        windows.setTitle("Cấu hình");//tiêu đề
        windows.setSize(500, 300);//kích thước
        windows.setResizable(false);//không cho chỉnh kích thước
        ImageIcon ic = new ImageIcon(MainWindows.class.getResource("/image/icon.png"));
        windows.setIconImage(ic.getImage());
        windows.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);//tắt khi nhấn dấu X
        SettingPanel sPanel = new SettingPanel();//tạo Panel chính trên Frame
        sPanel.setBounds(0, 0, 500, 300);
        windows.add(sPanel);

        windows.setLocationRelativeTo(null);//xuất hiện giữa màn hình
        windows.setVisible(true);
        windows.setEnabled(true);

    }
}
